<template>
  <div class="message">
    <nav class="nav">
      <router-link
        class="iconleft"
        :to="{ path: '/personal' }"
      >&lt;</router-link>
      消息
    </nav>
    <ul id="msglist">
      <li v-for="(item, index) in msglist" :key="index" class="msgleft">
        <div class="iconbox"><span :class="item.icon"></span></div> 
       <span class="innermsg"> {{ item.msg }}</span>
      </li>
    </ul>
  </div>
</template>

<script>
import "../../../static/css/msglist/iconfont.css";
export default {
  data(){
    return{
            msglist: [
        { msg: "官方通知",icon:"iconfont icon-tongzhi icon" },
        { msg: "热门推荐" ,icon:"iconfont icon-remen icon"},
        { msg: "评论",icon:"iconfont icon-pinglun icon" },
        { msg: "收藏",icon:"iconfont icon-shoucang icon" },
        { msg: "点赞" ,icon:"iconfont icon-dianzan icon"},
        { msg: "新的粉丝" ,icon:"iconfont icon-fans icon"},
        { msg: "商城客服" ,icon:"iconfont icon-kefu icon"},
      ],
    }
  }
};
</script>

<style scoped lang="less">
.nav {
  font-size: 16px;
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  background-color: #f3d02a;
  position: relative;
  .iconleft {
    text-decoration: none;
    position: absolute;
    left: 10px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
}
#msglist{
    margin-top: 30px;
    list-style: none;
    width: 100%;
    padding: 0;
    font-size: 14px;
    li{
        height: 50px;
        line-height: 50px;
        position: relative;
        left: 0;
        width: 100%;
        color: #666;
        position: relative;
        .iconbox{
          width: 25px;
          height: 25px;
          line-height: 25px;
          background-color: #f3d02a;
          float: left;
          margin-left: 30px;
          position: relative;
          span{
            width: 25px;
            height: 25px;
            color: #fff;
          position: absolute;
          left: 6px;
        }
        }
        .innermsg{
         float: left;
          height: 30px;
          line-height: 30px;
          text-indent: 10px;
        }
    }
}
</style>